package com.codeworker.it.demo.config;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import java.util.List;

/**
 * S3配置类
 *
 * @author xin
 * @since 2023-07-17
 */
@Configuration
@ConfigurationProperties(prefix = S3Configuration.PREFIX)
public class S3Configuration {
    public final static String PREFIX = "s3.config";

    @Setter
    @Getter
    private List<S3SingleConfiguration> s3ConfigList;

    @Getter
    @Setter
    @ToString
    public static class S3SingleConfiguration {
        private String host;
        private String ak;
        private String sk;
        private String beanName;
        private List<String> buckets;
    }
}
